export default{
    mounted() {
        this.initData()
    },
    destroyed() {
        window.removeEventListener('scroll',this.scroll)
      },
      methods: {
        scroll(){
            const windowHeight=window.innerHeight
            const bodyHeight=document.body.innerHeight
            const scrollY=window.scrollY
            console.log(windowHeight,bodyHeight,scrollY)
            if(scrollY+windowHeight ===bodyHeight){
              console.log('到底部')
              this.fetchParams.page+=1
              this.fetchProductList()
            }
          }
      },
}